/* gm_sitemap.js <?php
#   --------------------------------------------------------------
#   gm_sitemap.js 2011-01-24 gambio
#   Gambio GmbH
#   http://www.gambio.de
#   Copyright (c) 2011 Gambio GmbH
#   Released under the GNU General Public License (Version 2)
#   [http://www.gnu.org/licenses/gpl-2.0.html]
#   --------------------------------------------------------------
?>*/

$(document).ready(function(){
	$("#gm_generate").click(function(){
		$("#gm_box_sitemap_request").fadeOut('normal');
	});
});

function gm_show_request(id) {

	$("#gm_box_request").html($("#ping_" + id).html());
	//$("#ping_" + id).html(' ');
	$("#gm_box_sitemap_request").fadeIn('normal');

}

function gm_create_sitemap(action) {	

	var ping_google		= 0;
	var ping_yahoo		= 0;
	var ping_ask		= 0;
	var ping_live		= 0;

	if($("#ping_google").attr("checked") == true) {
		ping_google = 1;
	}

	if($("#ping_yahoo").attr("checked") == true) {
		ping_yahoo = 1;
	}

	if($("#ping_ask").attr("checked") == true) {
		ping_ask = 1;
	}

	if($("#ping_live").attr("checked") == true) {
		ping_live = 1;
	}

	//var ping_google = $("#ping").attr();
	$("#gm_box_sitemap").fadeIn('normal');
	$("#gm_box_google").html('<img src="../images/loading.gif" WIDTH="16" HEIGHT="16" BORDER="0" ALT="loading">');
	$("#gm_box_google").load(action
									+ "&ping_google="	+ escape(ping_google)
									+ "&ping_yahoo="	+ escape(ping_yahoo)
									+ "&ping_ask="		+ escape(ping_ask)
									+ "&ping_live="		+ escape(ping_live)
							);

	return;
}